Theme presets background colors#2437
Merged
Merged
Conversation
Read theme-provided background color presets from theme.options.presets.backgroundColors. Unlike palette colors, presets carry their display name inline as data (host apps will edit them via theme customization overrides) and are copied by value when applied, so they never change once selected.
Allow ColorInputView swatches to be {value, text} objects in addition
to plain color strings. The text is shown as the swatch tooltip; the
value is the color that gets applied. Swatches are now deduplicated by
value so a labelled preset and a plain color with the same value do not
appear twice. Plain string swatches keep their existing behavior.
Merge theme-provided background color presets ahead of colors already used in other sections, and offer the combined list as swatches for the backdrop, card surface and split overlay color inputs. Presets surface with their inline name as the swatch tooltip; picking one stores the plain color value.
Allow ColorInputView swatches to carry an optional group key. Consecutive swatches with a different group are separated by a divider inside the picker drop down, letting callers visually distinguish sets of colors (e.g. theme presets vs. colors already in use) without labels. Plain and ungrouped swatches keep rendering without a divider.
Tag theme background color presets and colors already used in other sections with separate group keys before passing them to the backdrop, card surface and split overlay color inputs. The picker then separates the two sets with a divider instead of showing one flat list.
Add a section to the Custom Colors and Dimensions guide describing the presets.background_colors theme option: how it differs from palette colors (copied by value, not referenced), why names are stored inline, and how presets surface in the section background color picker.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
REDMINE-21315